package utils

import "encoding/json"

type Entry[K comparable, V any] struct {
	Key   K
	Value V
}

type JsonSerialization interface {
	ToJSON() ([]byte, error)
	FromJSON(data []byte) error
}
type Map[K comparable, V any] interface {
	json.Unmarshaler
	json.Marshaler
	JsonSerialization

	Put(key K, value V)
	Get(key K) (value V, found bool)
	Remove(key K)
	Empty() bool
	Size() int
	Keys() []K
	Values() []V
	EntrySet() []Entry[K, V]
	Clear()
	Map() map[K]V
	String() string
}
